]> dgit.raspbian.org Git - gnome-shell.git/commit
st/scroll-view: Hide scroll bar from layout when its hidden
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 16 Feb 2022 15:16:49 +0000 (16:16 +0100)
committerJonas Dreßler <verdre@v0yd.nl>
Sat, 18 Nov 2023 11:22:51 +0000 (12:22 +0100)
commit65e56183b117b69dfbb5ff012ad756ea32231846
treeebc18097caa6d5d2b5aee9a03e2a0c14efb398b3
parenta59a992daaa001100b07ca10ae12ec1edba499d0
st/scroll-view: Hide scroll bar from layout when its hidden

We hide scrollbars with POLICY_AUTOMATIC when the content of the scroll
view fits completely inside the view without having to scroll. In this case
it seems like a good idea to give the content the full available size
without subtracting scroll bars from that size.

So subtract the scroll bar from the size we give to the child only when
the scroll bar is actually visible, when it's invisible subtract 0 instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2190>
src/st/st-scroll-view.c